/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package e.odbo.data.bean.key;

import e.odbo.data.bean.IKeyed;
import e.odbo.data.bean.I_BaseBean;

/**
 * @author Administrator
 */
public class KeyBuilder {

    public static IKeyed<String> getKey(final String s) {
        return new IKeyed<String>() {
            public String getKey() {
                return s;
            }
        };
    }

    public static IKeyed<Integer> getKey(final int i) {
        return new IKeyed<Integer>() {
            public Integer getKey() {
                return i;
            }
        };
    }

    public static IKeyed getBeanKey(I_BaseBean b) {
        final Object key = b.getKey();
        return new IKeyed() {
            @Override
            public Object getKey() {
                return key;
            }

        };
    }
}
